package com.starry.core.security.config;

import lombok.Data;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.cloud.context.config.annotation.RefreshScope;
import org.springframework.context.annotation.Configuration;

import java.util.Collections;
import java.util.Set;

/**
 * 认证配置
 *
 * @author xiaoke
 */
@Data
@Configuration
@ConfigurationProperties(prefix = "security")
public class SecurityProperties {
    /**
     * 需要忽略认证地址
     */
    private Set<String> ignoreAuth = Collections.emptySet();

    public String[] getIgnoreAuth() {
        return ignoreAuth.toArray(new String[0]);
    }

    public Set<String> getIgnoreAuthSet() {
        return ignoreAuth;
    }
}
